﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="KlearTweet.Web.Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>KlearTweet - Twitter Client using Silverlight 3</title>
    <link rel="icon" type="image/vnd.microsoft.icon" href="favicon.ico" />
    <link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />

    <style type="text/css">
      html, body { height: 100%; overflow: auto; }
      body { padding: 0; margin: 0; }
      #silverlightControlHost { height: 100%; text-align:center; }
    </style>
    <script type="text/javascript" src="Silverlight.js"></script>
    <script type="text/javascript">
        function onSilverlightError(sender, args) {
            var appSource = "";
            if (sender != null && sender != 0) {
              appSource = sender.getHost().Source;
            }
            
            var errorType = args.ErrorType;
            var iErrorCode = args.ErrorCode;

            if (errorType == "ImageError" || errorType == "MediaError") {
              return;
            }

            var errMsg = "Unhandled Error in Silverlight Application " +  appSource + "\n" ;

            errMsg += "Code: "+ iErrorCode + "    \n";
            errMsg += "Category: " + errorType + "       \n";
            errMsg += "Message: " + args.ErrorMessage + "     \n";

            if (errorType == "ParserError") {
                errMsg += "File: " + args.xamlFile + "     \n";
                errMsg += "Line: " + args.lineNumber + "     \n";
                errMsg += "Position: " + args.charPosition + "     \n";
            }
            else if (errorType == "RuntimeError") {           
                if (args.lineNumber != 0) {
                    errMsg += "Line: " + args.lineNumber + "     \n";
                    errMsg += "Position: " +  args.charPosition + "     \n";
                }
                errMsg += "MethodName: " + args.methodName + "     \n";
            }

            throw new Error(errMsg);
        }
    </script>
</head>
<body>
    <form runat="server" style="height:100%">
      <div id="silverlightControlHost">
        <script type="text/javascript">
            var isFirstTime = true;
            function onSourceDownloadProgressChanged(s, e) {
                var aspSilverlight = document.getElementById("aspSilverlight");
                if (isFirstTime) {
                    var ProgressBarAnimation = aspSilverlight.content.FindName("ProgressBarAnimation");
                    ProgressBarAnimation.Begin();
                    isFirstTime = false;
                }
                var progress = 0;
                if (e.progress) progress = e.progress;
                else progress = e.get_progress();
                var ProgressText = aspSilverlight.content.FindName("ProgressText");
                ProgressText.Text = "Loading: " + Math.round(progress * 100) + "%";
            }
        </script>
        <object data="data:application/x-silverlight-2," type="application/x-silverlight-2" id="aspSilverlight" width="100%" height="100%">
		  <param name="source" value="ClientBin/KlearTweet.Client.xap" />
		  <param name="splashscreensource" value="SplashScreen.xaml" />
		  <param name="onsourcedownloadprogresschanged" value="onSourceDownloadProgressChanged" />
		  <param name="onError" value="onSilverlightError" />
		  <param name="background" value="white" />
		  <param name="minRuntimeVersion" value="3.0.40624.0" />
		  <param name="autoUpgrade" value="true" />
		  <param name="InitParams" runat="server" id="SilverlightInitParams" />
  <div>
    <div style="text-align:center;">
      <span style="font-family:Lucida Sans Unicode;color:#445C9A;font-weight:bold;font-size:30px;">K</span>
      <span style="font-family:Lucida Sans Unicode;color:#000000;font-weight:bold;font-size:30px;">lear</span>
      <span style="font-family:Verdana;color:#B1BBD5;font-weight:bold;font-size:30px;">T</span>
      <span style="font-family:Verdana;color:#000000;font-weight:bold;font-size:30px;">weet</span>
      <div style="position:absolute;top:0px;right:0px;">
        <a href="http://www.kleartweet.com/" style="text-decoration:none;">www.kleartweet.com</a>
      </div>
    </div>
    <div style="text-align:center;">
      <div style="width:150px;height:300px;position:relative;">
        <span style="font-family:Verdana;color:#B1BBD5;font-weight:bold;font-size:150px;position:absolute;top:40px;left:40px">T</span>
        <span style="font-family:Lucida Sans Unicode;color:#445C9A;font-weight:bold;font-size:200px;position:absolute;top:0px;left:0px">K</span>
      </div>
    </div>
    <p style="text-align:center;font-size:24px;">Twitter Client using Silverlight 3</p>
    <table style="width:100%;background-color:#FFCCCC;">
      <tr><td style="font-size:16px;text-align:right;">
        <div style="text-align:left;">
          Silverlight is not installed on this computer. It is a plug-in like the Adobe Flash Player.<br />
          To install it, click on <a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=3.0.40624.0">Install Microsoft Silverlight</a>.<br />
          Note that this installation might require administrator rights. Once it is done, refresh this page.
        </div>
      </td><td style="width:275px;text-align:left;">
      <a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=3.0.40624.0" style="text-decoration:none">
        <img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style:none" />
      </a>
      </td></tr>
    </table>
    <p style="font-size:14px;">(c) 2009, Pierre Henri Kuate. All rights reserved.</p>
  </div>
	    </object>
	    <iframe id="_sl_historyFrame" style="visibility:hidden;height:0px;width:0px;border:0px"></iframe>
	  </div>
    </form>

  <script type="text/javascript">
    var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
    document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
  </script>
  <script type="text/javascript">
    try {
      var pageTracker = _gat._getTracker("UA-6507647-5");
      pageTracker._trackPageview();
    } catch (err) { }
  </script>

</body>
</html>
